package com.spsy.pay.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.spsy.common.core.annotation.Excel;
import com.spsy.common.core.web.domain.BaseEntity;

/**
 * 支付订单对象 payment_order
 * 
 * @author arhat
 * @date 2025-05-26
 */
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class PaymentOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单ID */
    private Long id;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String orderNo;

    /** 商户ID */
    @Excel(name = "商户ID")
    private Long merchantId;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 订单金额 */
    @Excel(name = "订单金额")
    private BigDecimal amount;

    /** 币种 */
    @Excel(name = "币种")
    private String currency;

    /** 订单标题 */
    @Excel(name = "订单标题")
    private String subject;

    /** 订单描述 */
    @Excel(name = "订单描述")
    private String body;

    /** 状态(0-待支付,1-支付中,2-支付成功,3-支付失败,4-已退款,5-已关闭) */
    @Excel(name = "状态(0-待支付,1-支付中,2-支付成功,3-支付失败,4-已退款,5-已关闭)")
    private Long status;

    /** 订单过期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "订单过期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expireTime;

    /** 异步通知地址 */
    @Excel(name = "异步通知地址")
    private String notifyUrl;

    /** 同步跳转地址 */
    @Excel(name = "同步跳转地址")
    private String returnUrl;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setOrderNo(String orderNo) 
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo() 
    {
        return orderNo;
    }

    public void setMerchantId(Long merchantId) 
    {
        this.merchantId = merchantId;
    }

    public Long getMerchantId() 
    {
        return merchantId;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setAmount(BigDecimal amount) 
    {
        this.amount = amount;
    }

    public BigDecimal getAmount() 
    {
        return amount;
    }

    public void setCurrency(String currency) 
    {
        this.currency = currency;
    }

    public String getCurrency() 
    {
        return currency;
    }

    public void setSubject(String subject) 
    {
        this.subject = subject;
    }

    public String getSubject() 
    {
        return subject;
    }

    public void setBody(String body) 
    {
        this.body = body;
    }

    public String getBody() 
    {
        return body;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public void setExpireTime(Date expireTime) 
    {
        this.expireTime = expireTime;
    }

    public Date getExpireTime() 
    {
        return expireTime;
    }

    public void setNotifyUrl(String notifyUrl) 
    {
        this.notifyUrl = notifyUrl;
    }

    public String getNotifyUrl() 
    {
        return notifyUrl;
    }

    public void setReturnUrl(String returnUrl) 
    {
        this.returnUrl = returnUrl;
    }

    public String getReturnUrl() 
    {
        return returnUrl;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderNo", getOrderNo())
            .append("merchantId", getMerchantId())
            .append("userId", getUserId())
            .append("amount", getAmount())
            .append("currency", getCurrency())
            .append("subject", getSubject())
            .append("body", getBody())
            .append("status", getStatus())
            .append("expireTime", getExpireTime())
            .append("notifyUrl", getNotifyUrl())
            .append("returnUrl", getReturnUrl())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
